package com.dd.cloud.search;

import cn.easyes.starter.register.EsMapperScan;
import com.dd.cloud.common.config.obs.FileUrlPrefix;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

/**
 * @Description: 搜索服务
 * @Author: czg
 * @Date: 2023/5/13 14:14
 * @Version: 1.0.0
 */
@EnableDiscoveryClient
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableFeignClients
@EsMapperScan("com.dd.cloud.search.mapper")
@ComponentScan(basePackages = {
        "com.dd.cloud.search",
        "com.dd.cloud.common.config.cookie",
        "com.dd.cloud.common.config.servlet",
        "com.dd.cloud.common.config.common"},
        excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {FileUrlPrefix.class})
)
//nacos配置实时刷新
@RefreshScope
public class DdSearchServiceApplication {

    public static void main(String[] args) {
        SpringApplication.run(DdSearchServiceApplication.class, args);
    }

}
